#!/bin/sh

>tmp$$
cat CompositeStocks|sort |uniq  |while read stock
do
    rating=`curl -stderr "http://www.stockpickreport.com/abrating.php?sym=$stock" |egrep -o "ratingmeter/[a-zA-Z]+\.gif" |cut -d/ -f2- |cut -d. -f1`
    echo $stock $rating >> tmp$$
done

cat tmp$$ |grep -i strongbuy |awk '{print $1}'> StockpickLongList
cat tmp$$ |grep -i strongsell|awk '{print $1}'> StockpickShortList
